//---------------------------------------------------------------------------

#ifndef TDesignH
#define TDesignH

#include "TSimulate.h"
#include "TElementSerialNumber.h"
#include "TCheck.h"
//#include "TElement.h"

//---------------------------------------------------------------------------
enum eDataManageModel {chk, xml};


class TDesign
{
private:
public:
	eDataManageModel DataManageModel, OldDataManageModel;

	int FileVersion, FileBuild;
	AnsiString Name;
	AnsiString UserID;
	TChecks Checks;
//	TElements Elements;
	TProfiles Profiles;
	TSwitches Switches;
	TCurves Curves;
	TArresters Arresters;
	TRetarders Retarders;
	TCtrRetarders CtrRetarders;
	TTrackRetarders TrackRetarders;
	TTracks Tracks;
	TCuts Cuts;
    TTrains Trains;
	TWeathers Weathers;
	TWarningMakes StopPoints, WarningMakes;

	__fastcall TDesign();
	TDesign & __fastcall operator = (const TDesign & t);
    bool __fastcall Initialize(void);
//	bool __fastcall SetElements(void);
	bool __fastcall SetXMLNode(IXMLNode * Node);
	bool __fastcall SetXMLNode1(IXMLNode * Node);
	bool __fastcall GetXMLNode(IXMLNode * Node);
	void __fastcall GetXMLNode0(IXMLNode * Node);
	void __fastcall GetXMLNode1(IXMLNode * Node);
	TProfile __fastcall GetSelectedProfile(void);
	TCurves __fastcall GetSelectedCurves(void);
	TSwitches __fastcall GetSelectedSwitches(void);
	TRetarders __fastcall GetSelectedRetarders(void);
	TCtrRetarders __fastcall GetSelectedCtrRetarders(void);
	TArresters __fastcall GetSelectedArresters(void);
	TTrackRetarders __fastcall GetSelectedTrackRetarders(void);
	TCuts __fastcall GetSelectedCuts(void);
	TWarningMake __fastcall GetSelectedWarningMake(void);
	float __fastcall GetSelectedStopPoint(void);
	TWeather __fastcall GetSelectedWeather(void);
	bool __fastcall ChangeDataManageModel(void);
	AnsiString __fastcall SetElementSerialNumber(const eElementType ElementType);
	bool __fastcall SetTreeView(TTreeView * TreeView);
	void __fastcall SetListViewChangedBox(TListView * ListView, const eElementType ElementType);
	void __fastcall SetAdvStringGridCheckBox(TAdvStringGrid * AdvStringGrid, const eElementType ElementType, const int TrackIndex);
	bool __fastcall Complete(void);
};

class TDesigns : public vector<TDesign>
{
public:
	__fastcall TDesigns();
	TDesigns & __fastcall operator = (const TDesigns & t);
};



#endif
